<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
>

<html lang="en">
<head>
	<head th:include="header::header"></head>
	<title>普惠商城-个人中心-通用提示</title>
	<style type="text/css">
		.notice_back:hover{
			cursor: pointer;
		}
	</style>
</head>
<body>
	
	<!-- 顶部导航条开始 -->
	<div  th:include="personal/personalhead::order-personalhead-nav"></div>
	<!-- 顶部导航条结束 -->
	<!-- 顶部搜索栏部分开始 -->
	<div  th:include="personal/personalsearch::order-personalsearch-nav"></div>
	<!--个人中心中间主体框架  -->
	<div class="centerbody personal_middle">
		<!-- 左侧通用导航栏 -->
		<div class="personal_middle_nav" th:include="commonfragment::order-left-menu-nav"></div>
		<div class="personal_middle_main">
			<div class="personal_middle_main_tit">
				<span>个人中心位置</span>
			</div>
			<div class="personal_middle_main_box notice commonp">
				<input type="hidden" th:value="${pCode}" id = "p_code"/>
				<p><img th:src="@{/images/success.png}" alt=""></p>
				<p>恭喜您，<span th:text="${message}"></span> ！</p>
				<p><input type="button" value="返回（3s倒计时）" id="callback_id"class="notice_back" onclick="callBack()"></p>
			</div>
		</div>
		<div style="clear:both;"></div>
	</div>
	<!-- 页面底部 -->
	<div th:include="footer::footer"></div>

</body>

<script th:inline="javascript">
$('input.notice_back').hover(function(){
   			$(this).addClass('confirm');
   			$(this).siblings().removeClass('confirm');
   		},function(){
   			$(this).removeClass('confirm');
});
 
function callBack(){
	jumpAcc();
}
var num = 3;
$(function(){
	var setInterval = window.setInterval(function(){
		if(num > 0){
			num = num - 1;
			$("#callback_id").val("返回（"+num+"s倒计时）");
		}else{
			window.clearInterval(setInterval);
			jumpAcc();
		}
	},1000);
});
function jumpAcc(){
	var p_code = $("#p_code").val();
	if(p_code == 2 || p_code == 4){
		$.post("/member/removeUserCache",function(data){
			if(data.code == "200"){
				window.location.href="/account/loadAccountSecurity";
			}
		});
	}else{
		window.location.href="/account/loadAccountSecurity";
	}
}
</script>
</html>